/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.kleintjes.structural.composite_pattern.Impl;

import com.kleintjes.structural.composite_pattern.Component;

/**
 *
 * @author Hughan.Kleintjes.hughanK@gmail.com
 */
public class Leaf implements Component{
    
    String name;
    
    public Leaf(String name) {
        this.name = name;
    }

    @Override
    public void sayGoodbye() {
        System.out.println(name +" leaf says goodbye");
    }

    @Override
    public void sayHello() {
        System.out.println(name +" leaf says hello");
    }
    
}
